package com.lkq;

public class PhoneBalance implements Comparable<PhoneBalance>{

    private String phone;
    private int calls;
    private Double balance;

    public PhoneBalance() {
    }

    public PhoneBalance(String phone, int calls, Double balance) {
        this.phone = phone;
        this.calls = calls;
        this.balance = balance;
    }

    public String getPhone() {
        return phone;
    }

    public int getCalls() {
        return calls;
    }

    public Double getBalance() {
        return balance;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setCalls(int calls) {
        this.calls = calls;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    @Override
    public String toString() {
        return "CellBalance{" +
                "phone='" + phone + '\'' +
                ", calls=" + calls +
                ", balance=" + balance +
                '}'+"\n";
    }
    /**
     *
     * @param lkq
     * @return
     */
    public int compareTo(PhoneBalance lkq) {
        return balance>lkq.balance?-1:1;

    }
}
